<%@ page import="gdepot.AccountBank" %>
<!DOCTYPE html>
<html>
<head>
    <meta name="layout" content="main">
    <g:set var="entityName" value="${message(code: 'accountBank.label', default: 'AccountBank')}"/>
    <title><g:message code="default.list.label" args="[entityName]"/></title>
</head>

<body>
<div class="row">
    <div class="container">
        <ol class="breadcrumb">
            <li>AccountBank List</li>
        </ol>
    </div>
</div>

<div class="row">
    <div class="container" style="margin-bottom: -10px;">

        <table width="100%" class="table">
            <tr>
                <g:form class="navbar-form navbar-left" role="search"
                        url="[action: 'search', controller: 'accountBank']">

                    <td width="20%">
                        <g:textField name="fullName" maxlength="20" class="form-control" required="" value=""
                                     placeholder="银行卡号" style="text-align:center"/>
                    </td>
                    <td width="5%">
                        <g:actionSubmit action="search" class="btn btn-default btn-block" value="搜索"/>
                    </td>

                </g:form>
                <td width="60%"></td>
                <td width="5%"><g:link class="btn btn-primary btn-block" controller="transactionRecord" action="choseBank">新建</span></g:link></td>
            </tr>
        </table>
    </div>
</div>

<div class="role">

    <div class="container">

        <g:if test="${flash.message}">
            <div class="alert alert-warning">
                <a href="#" class="close" data-dismiss="alert">
                &times;
                </a>
                <strong>${flash.message}</strong>
            </div>
        </g:if>
        <table class="table table-striped table-bordered">
            <thead>
            <tr>

                <g:sortableColumn property="cellphone"
                                  title="${message(code: 'accountBank.cellphone.label', default: 'Cellphone')}"/>

                <g:sortableColumn property="certificateType"
                                  title="${message(code: 'accountBank.certificateType.label', default: 'Certificate Type')}"/>

                <g:sortableColumn property="idCard"
                                  title="${message(code: 'accountBank.idCard.label', default: 'Id Card')}"/>

                <g:sortableColumn property="status"
                                  title="${message(code: 'accountBank.status.label', default: 'Status')}"/>

                <g:sortableColumn property="isPrimary"
                                  title="${message(code: 'accountBank.isPrimary.label', default: 'Is Primary')}"/>

                <g:sortableColumn property="bankCardNo"
                                  title="${message(code: 'accountBank.bankCardNo.label', default: 'Bank Card No')}"/>

            </tr>
            </thead>
            <tbody>
            <g:each in="${accountBankInstanceList}" status="i" var="accountBankInstance">
                <tr class="${(i % 2) == 0 ? 'even' : 'odd'}">

                    <td><g:link action="show"
                                id="${accountBankInstance.id}">${fieldValue(bean: accountBankInstance, field: "cellphone")}</g:link></td>

                    <td>${fieldValue(bean: accountBankInstance, field: "certificateType")}</td>

                    <td>${fieldValue(bean: accountBankInstance, field: "idCard")}</td>

                    <td>${fieldValue(bean: accountBankInstance, field: "status")}</td>

                    <td><g:formatBoolean boolean="${accountBankInstance.isPrimary}"/></td>

                    <td>${fieldValue(bean: accountBankInstance, field: "bankCardNo")}</td>

                </tr>
            </g:each>
            </tbody>
        </table>

        <div class="pagination">
            <g:paginate total="${accountBankInstanceCount ?: 0}"/>
        </div>
    </div>
</div>
</body>
</html>
